package com.videoanswer.van.web.client.controller;

import java.util.HashMap;
import java.util.Map;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.servlet.ModelAndView;

import com.videoanswer.van.service.PreCourseRefineSearchObject;

@Controller
public class PreCourseRefineSearchController {
	private PreCourseRefineSearchObject preCourseRefineSearch;
	@RequestMapping(value = { "/preCourseRefineSearch" }, method = { RequestMethod.POST })
	public ModelAndView preCourseRefineSearch(HttpServletRequest request,
			HttpServletResponse response, HttpSession session) throws Exception{
		
		Map<String, Object> map = new HashMap<String, Object>();
		preCourseRefineSearch.setProviceAndCity(request.getParameter("provinceAndCity"));
		preCourseRefineSearch.setDistrict(request.getParameter("district"));
		preCourseRefineSearch.setGrade(request.getParameter("grade"));
		preCourseRefineSearch.setSubject(request.getParameter("subject"));
		
		map.put("provinceAndCity", preCourseRefineSearch.getProviceAndCity());
		map.put("district", preCourseRefineSearch.getDistrict());
		map.put("grade", preCourseRefineSearch.getGrade());
		map.put("subject", preCourseRefineSearch.getSubject());
		return new ModelAndView("/preCourseRefineSearch", map);
	}
	

}
